package p270jp.pxv.android.viewholder;

import android.content.Context;
import android.content.Intent;
import android.content.res.Resources;
import android.view.View;
import android.view.ViewGroup;
import androidx.recyclerview.widget.LinearLayoutManager;
import java.util.List;
import p014ae.View$OnClickListenerC0050b;
import p045be.C1060c;
import p045be.HorizontalLayoutLiveAdapter;
import p134ei.AnalyticsAction;
import p270jp.pxv.android.R;
import p270jp.pxv.android.activity.FollowLiveListActivity;
import p270jp.pxv.android.model.AppApiSketchLive;
import p270jp.pxv.android.widget.SnappyRecyclerView;
import p314lg.ViewHolderFollowLiveListBinding;
import p325m0.MutabilityOwnership;
import p451qm.CarouselItemDecoration;
import p521th.SolidItemViewHolder;
import p677zi.PixivImageLoader;

/* renamed from: jp.pxv.android.viewholder.FollowLiveListViewHolder */
/* loaded from: classes2.dex */
public class FollowLiveListViewHolder extends SolidItemViewHolder {
    private final HorizontalLayoutLiveAdapter adapter;

    private FollowLiveListViewHolder(ViewHolderFollowLiveListBinding i6Var, List<AppApiSketchLive> list, AnalyticsAction aVar, PixivImageLoader aVar2) {
        super(i6Var.f2666e);
        HorizontalLayoutLiveAdapter lVar = new HorizontalLayoutLiveAdapter(aVar2);
        this.adapter = lVar;
        lVar.f4764d = list;
        lVar.f4765e = aVar;
        lVar.f3606a.m10780b();
        SnappyRecyclerView snappyRecyclerView = i6Var.f21686r;
        this.itemView.getContext();
        snappyRecyclerView.setLayoutManager(new LinearLayoutManager(0, false));
        SnappyRecyclerView snappyRecyclerView2 = i6Var.f21686r;
        Context context = snappyRecyclerView2.getContext();
        MutabilityOwnership.m3745m(context, "context");
        Resources resources = context.getResources();
        snappyRecyclerView2.m10871g(new CarouselItemDecoration(resources.getDimensionPixelSize(R.dimen.carousel_item_margin_outside), resources.getDimensionPixelSize(R.dimen.carousel_item_margin_inside)));
        i6Var.f21686r.setAdapter(lVar);
        i6Var.f21685q.setOnClickListener(new View$OnClickListenerC0050b(this, 22));
    }

    /* renamed from: a */
    public static /* synthetic */ void m4445a(FollowLiveListViewHolder followLiveListViewHolder, View view) {
        followLiveListViewHolder.lambda$new$0(view);
    }

    public static FollowLiveListViewHolder createViewHolder(ViewGroup viewGroup, List<AppApiSketchLive> list, AnalyticsAction aVar, PixivImageLoader aVar2) {
        return new FollowLiveListViewHolder((ViewHolderFollowLiveListBinding) C1060c.m10358a(viewGroup, R.layout.view_holder_follow_live_list, viewGroup, false), list, aVar, aVar2);
    }

    public void lambda$new$0(View view) {
        Context context = this.itemView.getContext();
        Context context2 = this.itemView.getContext();
        int i = FollowLiveListActivity.f18346g0;
        context.startActivity(new Intent(context2, FollowLiveListActivity.class));
    }

    @Override // p521th.SolidItemViewHolder
    public void onBindViewHolder(int i) {
        this.adapter.f3606a.m10780b();
    }
}
